{% extends 'ForkCMSInstallerBundle:Installer:base.html.twig' %}
{% import 'ForkCMSInstallerBundle:Installer:navigation.html.twig' as macro %}

{% form_theme form 'ForkCMSInstallerBundle:Installer:form_theme.html.twig' %}

{% block navigation %}
  {{ macro.navigation('step-4') }}
{% endblock %}

{% block content %}

  {{ form_start(form) }}
  <div class="row fork-module-messages">
    <div class="col-md-12">
      {{ form_errors(form) }}
      <div id="javascriptDisabled" class="alert alert-danger">
        <p>Javascript should be enabled.</p>
      </div>
    </div>
  </div>
  <div class="row fork-module-content">
    <div class="col-md-12">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h2 class="panel-title">
            Settings
          </h2>
        </div>
        <div class="panel-body">
          <p class="help-block">Enter your database details. Make sure this database already exists.</p>
          <div class="form-group">
            <label for="hostname">
              Hostname
              <abbr title="Required field">*</abbr>
            </label>
            <p class="help-block">If you are working locally, your hostname is probably <strong>localhost</strong>.</p>
            <div class="form-group form-inline">
              {{ form_widget(form.databaseHostname) }} : {{ form_widget(form.databasePort) }}
            </div>
          </div>
          <div class="form-group">
            <label for="database">
              Database
              <abbr title="Required field">*</abbr>
            </label>
            <p class="help-block">Make sure this database is empty!</p>
            {{ form_widget(form.databaseName) }}
          </div>
          <div class="form-group">
            <label for="username">
              Username
              <abbr title="Required field">*</abbr>
            </label>
            {{ form_widget(form.databaseUsername) }}
          </div>
          <div class="form-group">
            <label for="password">
              Password
              <abbr title="Required field">*</abbr>
            </label>
            {{ form_widget(form.databasePassword) }}
          </div>
        </div>
        <div class="panel-footer">
          <div class="btn-toolbar">
            <div class="btn-group pull-left" role="group">
              <a href="{{ path('install_step3') }}" class="btn btn-default">
                <span class="fa fa-chevron-left" aria-hidden="true"></span> Previous
              </a>
            </div>
            <div class="btn-group pull-right" role="group">
              <button type="submit" id="installerButton" name="installer" class="btn btn-primary">
                Next <span class="fa fa-chevron-right" aria-hidden="true"></span>
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  {{ form_end(form) }}

{% endblock %}
